A rewriting logic approach to operational semantics

نویسندگان

  • Traian-Florin Serbanuta
  • Grigore Rosu
  • José Meseguer
چکیده

We show how one can use rewriting logic to faithfully capture (not implement) various operational semantic frameworks as rewrite logic theories, namely big-step and small-step semantics, reduction semantics using evaluation contexts, and continuation-based semantics. There is a one-to-one correspondence between an original operational semantics and its associated rewrite logic theory, both notationally and computationally. Once an operational semantics is defined as a rewrite logic theory, one can use standard, off-the-shelf context-insensitive rewrite engines to “execute” programs directly within their semantics; in other words, one gets interpreters for free for the defined languages, directly from their semantic definitions. Experiments show that the resulting correct-by-definition interpreters are also reasonably efficient.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Matching Logic Rewriting: Unifying Operational and Axiomatic Semantics in a Practical and Generic Framework

Matching logic allows to specify structural properties about program configurations by means of special formulae, called patterns, and to reason about them by means of pattern matching. This paper proposes rewriting over matching logic formulae, which generalizes both term rewriting and Hoare triples, as a unified framework for operational semantics and for program verification. A programming l...

متن کامل

A rewriting logic framework for operational semantics of membrane systems

Existing results in membrane computing refer mainly to P systems’ characterization of Turing computability, also to some polynomial solutions to NP-complete problems by using an exponential workspace created in a “biological way”. In this paper we define an operational semantics of a basic class of P systems, and give two implementations of the operational semantics using rewriting logic. We pr...

متن کامل

A Rewriting Logic Approach to Operational Semantics (Extended Abstract)

This paper shows how rewriting logic semantics (RLS) can be used as a computational logic framework for operational semantic definitions of programming languages. Several operational semantics styles are addressed: big-step and small-step structural operational semantics (SOS), modular SOS, reduction semantics with evaluation contexts, and continuation-based semantics. Each of these language de...

متن کامل

On the Completeness of Narrowing as the Operational Semantics of Functional Logic Programming

In our previous work Go&al 91] we used a restricted kind of applicative rewriting systems as computational model for higher-order (HO) lazy functional programming, and we proved soundness and completeness of innnite rewriting w.r.t. a declarative semantics, in the spirit of logic programming. The aim of this paper is to present similar results for functional logic programming. We model HO funct...

متن کامل

Operational Semantics of Constraint Logic Programs with Coroutining

The semantics of constraint logic programming languages with coroutining facilities (e.g., \freeze," suspension, residuation) cannot be fully declarative. Thus, an operational semantics has to be taken as the deening one. We give a formal operational semantics for a Prolog-like language with cut and entailment-based conditional. Our approach is derived from those used for concurrent calculi. We...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Inf. Comput.

دوره 207  شماره 

صفحات  -

تاریخ انتشار 2009